package com.student;

public class Student {
    // 学生类的属性
    private String name;       // 姓名
    private String studentId;  // 学号
    private String className;  // 班级
    private String gender;     // 性别
    private int age;           // 年龄
    private String personality;// 性格

    // 构造函数：初始化学生对象
    public Student(String name, String studentId, String className, String gender, int age, String personality) {
        this.name = name;
        this.studentId = studentId;
        this.className = className;
        this.gender = gender;
        this.age = age;
        this.personality = personality;
    }

    // 获得姓名
    public String getName() {
        return name;
    }

    // 获得学号
    public String getStudentId() {
        return studentId;
    }

    // 获得班级
    public String getClassName() {
        return className;
    }

    // 获得性别
    public String getGender() {
        return gender;
    }

    // 获得年龄
    public int getAge() {
        return age;
    }

    // 获得性格
    public String getPersonality() {
        return personality;
    }

    // 信息概要
    public String getInfo() {
        return "姓名: " + name + ", 学号: " + studentId + ", 班级: " + className +
                ", 性别: " + gender + ", 年龄: " + age + ", 性格: " + personality;
    }
}